extends layout-customer

block head

block content
	h1.page-header Dashboard
	h2.sub-header Haushalte
	
	div.container-fluid
		div.row
			each household in households
				div.col-xs-12.col-sm-6.col-md-3
					div.tile
						div.row.tile-fill
							h3
								a(href='/household/' + household.id)= household.name + " » "
									span.badge(id='household'+ household.id + 'new' style='display: none;') Neu
								span
									if household.role === 'founder'
										span &nbsp; &#9733;
						div.row.tile-fill
							span.value
								= household.members
						div.row.tile-fill
							span.value
								span(class=household.total < 0 ? 'money-neg' : (household.total > 0 ? 'money-pos' : 'money-zero'))= formatCurrency(household.total)
						div.row.tile-fill
							a.disabled.pull-right.btn.btn-danger(href='/household/leave?id=' + household.id)
								span.glyphicon.glyphicon-trash(aria-hidden='true')
								span.sr-only Verlassen

	p &#9733; = Sie sind Gründer
					
	form(method='POST', action='/household/create')
		input(type='hidden', name='_csrf', value=_csrf)
		div.input-group
			input.form-control(type='text', placeholder='Name, z.B. Wohnung in München', name='name', required='required')
			span.input-group-btn
				input.btn.btn-primary(type='submit', value='Gründen')